using System;
using System.Drawing;
using System.Collections;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.IO;
using System.Web.Security;

namespace webapp4U.UI
{
    [ParseChildren(true)]
    public class RangeValid : System.Web.UI.WebControls.RangeValidator
    {
        private string _resourceName;
   
        public string ResourceName
        {
            get { return _resourceName; }
            set { _resourceName = value; }
        }

        protected override void CreateChildControls()
        {
            EnableViewState = false;
            this.Display = ValidatorDisplay.None;

            if (ResourceName != "")
            {
                this.ErrorMessage = ResourceManager.GetString(ResourceName);
                this.SetFocusOnError = true;
            }
            else
            {
                this.Visible = false;
            }
            
        }
     
    }
}
